package com.example.mybatisplus.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.mybatisplus.entity.UserRole;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: lixiao
 * Created Date: 2020/9/21 15:38
 */
@Repository
public interface UserRoleMapper extends BaseMapper<UserRole> {

    @Select("SELECT *  FROM SYS_USER, SYS_ROLE WHERE SYS_USER.role = SYS_ROLE.oid")
   List<UserRole> getUserRole();

}